package com.weicoder.shop.po

import java.util.List
import javax.persistence.Entity
import org.hibernate.annotations.DynamicInsert
import org.hibernate.annotations.DynamicUpdate
import org.springframework.context.annotation.Scope
import org.springframework.stereotype.Component
import org.springframework.beans.factory.config.ConfigurableBeanFactory
import com.weicoder.base.annotation.Cache
import com.weicoder.site.entity.base.BaseEntityIdTime
import scala.beans.BeanProperty
import java.lang.Boolean
import java.math.BigDecimal

/**
 * 商品实体
 * @author WD
 * @since JDK7
 * @version 1._ 2_12-_7-3_
 */
@Component
@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
@Entity
@DynamicInsert
@DynamicUpdate
@Cache
class Product extends BaseEntityIdTime {
  // 规格值
  //	@Type(type = "com.weicoder.base.dao.hibernate.type.JsonType")
  //	List<SpecificationValue>	specificationValues
  // 商品ID
  @BeanProperty
  var goodsId: Integer = _
  // 名称
  @BeanProperty
  var name: String = _
  // 编号
  @BeanProperty
  var sn: String = _
  // 价格
  @BeanProperty
  var price: BigDecimal = _
  // 成本价
  @BeanProperty
  var cost: BigDecimal = _
  // 市场价
  @BeanProperty
  var market: BigDecimal = _
  // 库存
  @BeanProperty
  var store: Integer = _
  // 重量
  @BeanProperty
  var weight: Integer = _
  // 上架
  @BeanProperty
  var markeTable: Boolean = _
}